#ifndef __DSGN_HPP__
#define __DSGN_HPP__

#include "backbone_neck.hpp"
#include "bev_model.hpp"
// #include "camera-bevpool.hpp"
// #include "camera-depth.hpp"
#include "camera-geometry.hpp"
#include "camera-normalization.hpp"
// #include "camera-vtransform.hpp"
#include "postprocess.hpp"
#include "head-transbbox.hpp"
#include <string>


namespace dsgn {

struct CoreParameter {
  std::string camera_model;
  std::string bev_model;
//   std::string camera_vtransform;
  GeometryParameter geometry;
  NormalizationParameter normalize;
  PostProcessParams postprocess;
//   lidar::SCNParameter lidar_scn;
//   std::string transfusion;
//   head::transbbox::TransBBoxParameter transbbox;
};

class Core {
 public:
  virtual std::vector<Bndbox> forward(const unsigned char **camera_images, void *stream) = 0;

  // virtual std::vector<head::transbbox::BoundingBox> forward_no_normalize(const nvtype::half *camera_normed_images_device,
  //                                                                        void *stream) = 0;

  virtual void print() = 0;
  virtual void set_timer(bool enable) = 0;

  virtual void update(const float *camera2lidar, const float *camera_intrinsics, const float *lidar2image,
                      const float *img_aug_matrix, void *stream = nullptr) = 0;

  // Consider releasing excess memory if you don't need to update the matrix
  // After freeing the memory, the update function call will raise a logical exception.
  // virtual void free_excess_memory() = 0;
};

std::shared_ptr<Core> create_core(const CoreParameter &param);

};  // namespace bevfusion

#endif  // __BEVFUSION_HPP__